﻿<%@ Page Title="Control The Movement of Users in The System" Language="C#" AutoEventWireup="true"
    MasterPageFile="~/MasterPages/Report.Master" CodeBehind="ControlTheMovementOfTheUsersInTheSytemReport.aspx.cs"
    Inherits="Pap.Web.Modules.Reports.Views.ControlTheMovementOfTheUsersInTheSytemReport" %>

<%@ MasterType VirtualPath="~/MasterPages/Report.Master" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ReportParamsPlaceHolder" runat="server">
    <ext:Store runat="server" ID="strReport">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="DisplayName" />
                    <ext:RecordField Name="StepDisplayName" />
                    <ext:RecordField Name="LoanNumber" />
                    <ext:RecordField Name="CustomerName" />
                    <ext:RecordField Name="ActionDisplayName" />
                    <ext:RecordField Name="CreationDate" />
                    <ext:RecordField Name="CommitteeName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strUsers" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="UserID">
                <Fields>
                    <ext:RecordField Name="UserID" />
                    <ext:RecordField Name="Username" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strCommittee" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="CommitteeID">
                <Fields>
                    <ext:RecordField Name="CommitteeID" />
                    <ext:RecordField Name="CommitteeName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:FormLayout ID="FormLayout1" runat="server">
        <ext:Anchor Horizontal="95%">
            <ext:ComboBox runat="server" StoreID="strUsers" ID="cmbUsers" DisplayField="Username"
                ValueField="UserID" TypeAhead="true" Editable="true" FieldLabel="Users" AllowBlank="true"
                meta:resourcekey="cmbUsers" />
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:DateField runat="server" ID="dtDateFrom" AllowBlank="false" FieldLabel="From Date"
                meta:resourcekey="dtDateFrom" />
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:DateField runat="server" ID="dtDateto" AllowBlank="false" FieldLabel="To Date"
                meta:resourcekey="dtDateTo" />
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:NumberField runat="server" ID="numbLoanNumber" AllowBlank="true" FieldLabel="Loan Number"
                meta:resourcekey="numbLoanNumber">
            </ext:NumberField>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:ComboBox runat="server" StoreID="strCommittee" ID="cmbCommittee" DisplayField="CommitteeName"
                ValueField="CommitteeID" TypeAhead="true" Editable="true" FieldLabel="Committees"
                meta:resourcekey="cmbCommittee" AllowBlank="false" />
        </ext:Anchor>
    </ext:FormLayout>
    <asp:CompareValidator ID="cvDateFromTo" runat="server" ControlToCompare="dtDateTo"
        ControlToValidate="dtDateFrom" Operator="LessThanEqual" ErrorMessage="no message"></asp:CompareValidator>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ReportBodyPlaceHolder" runat="server">
    <div class="r-container">
        <header>
            <div class="logo">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Assets/Images/PAPLogo.jpg" />
            </div>
            <div class="title">
                <%= this.Page.Title %>
            </div>
        </header>
        <div>
            <ext:DataView ID="DataView1" runat="server" StoreID="strReport" SingleSelect="true"
                ItemSelector="tr.row" EmptyText="<div class='x-r-emptyText'>No Data To Display</div>">
                <Template>
                    <html>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                               <th>User Name</th>
                               <th>Stage</th>
                               <th>Loan Number</th>
                               <th>Customer Name</th>
                               <th>Operation</th>
                               <th>Date and Time</th>
                               <th>Association</th>
                            </tr>
                            <tpl for=".">
                            <tr>
                                <td>{DisplayName}</td>
                                <td>{StepDisplayName}</td>
                                <td>{LoanNumber}</td>
                                <td>{CustomerName}</td>
                                <td>{ActionDisplayName}</td>
                                <td>{CreationDate}</td>
                                <td>{CommitteeName}</td>
                            </tr>
                        </tpl>
                        </table>
                    </html>
                </Template>
            </ext:DataView>
        </div>
        <footer>
        </footer>
    </div>
</asp:Content>
